home *** CD-ROM | disk | FTP | other *** search
- this protocol is not exact.. some parts differ from the actual implementation
- it would be best if YOU closed this file immediately :))
-
-
-
- Description to how packet data is transferred between handler and
- server (handler's point of view..)
- --------------------------------------------------------------------------
-
- FH = FileHandle
- FL = FileLock
- BSTR = BCPL-String
- FIB = FileInfoBlock
- These abbreviations with small 's' before mean the same thing on the
- Server.
-
- =======================================
- ACTION_LOCATE_OBJECT:
- =======================================
- Preprocessing:
-
- Transfer to Server:
- FL->fl_Key or NULL if zero-lock.
- LONG (access mode)
- BSTR
-
- Serveraction:
-
- Backtransfer (besides dp_Action/Res1/Res2):
- Res1: BPTR to sFL or NULL if Error
-
- Postprocessing:
- Create FL if FL was Zero
- &sFL -> FL->fl_Key
-
- =======================================
- ACTION_FREE_LOCK:
- =======================================
- Preprocessing:
- If FL=0 then return immediately..
-
- Transfer to Server:
- FL->fl_Key
-
- Serveraction:
- Call Free_Lock.
-
- Backtransfer (besides dp_Action/Res1/Res2):
- ++ no transfer back - one way packet.. ++
-
- Postprocessing:
- Zero fl_Task and free memory.. Return DOSTRUE.
-
- =======================================
- ACTION_DISK_INFO:
- =======================================
- Preprocessing:
-
- Transfer to Server:
-
- Serveraction:
- Allocate memory for InfoData, call DISK_INFO.
-
- Backtransfer (besides dp_Action/Res1/Res2):
- block of InfoData - no Res1/Res2 is transferred..
-
- Postprocessing:
- Change VolumeNode entry for Handler machine.
-
- =======================================
- ACTION_INFO:
- =======================================
- Preprocessing:
-
- Transfer to Server:
- FL->fl_Key
-
- Serveraction:
- Allocate InfoData buffer, call INFO.
-
- Backtransfer (besides dp_Action/Res1/Res2):
- block of InfoData.
-
- Postprocessing:
-
- =======================================
- ACTION_EXAMINE_OBJECT:
- =======================================
- Preprocessing:
-
- Transfer to Server:
- FL->fl_Key
-
- Serveraction:
- Allocate own sFIB, call EXAMINE_OBJECT with sFL and sFIB.
- If ERROR, then dealloc sFIB.
-
- Backtransfer (besides dp_Action/Res1/Res2):
- &sFIB(APTR!), sFIB
-
- Postprocessing:
- &sFIB -> FIB->fib_DiskKey
-
- =======================================
- ACTION_EXAMINE_NEXT:
- =======================================
- Preprocessing:
-
- Transfer to Server:
- FL->fl_Key
- FIB->fib_DiskKey
-
- Serveraction:
- Call EXAMINE_NEXT. If ERROR, then dealloc sFIB.
-
- Backtransfer (besides dp_Action/Res1/Res2):
- sFIB
-
- Postprocessing:
-
- =======================================
- ACTION_SET_COMMENT:
- =======================================
- Preprocessing:
-
- Transfer to Server:
- FL->fl_Key
- [2bytes Space -> lW-alignment]
- Comment-String [filled up to 80 chars]
- Object-Name-String
-
- Serveraction:
- Call SET_COMMENT.
-
- Backtransfer (besides dp_Action/Res1/Res2):
-
- Postprocessing:
-
- =======================================
- ACTION_FLUSH:
- =======================================
- Preprocessing:
-
- Transfer to Server:
-
- Serveraction:
- Call ACTION_FLUSH.
-
- Backtransfer (besides dp_Action/Res1/Res2):
-
- Postprocessing:
-
- =======================================
- ACTION_WRITE_PROTECT:
- =======================================
- Preprocessing:
-
- Transfer to Server:
- dp_Arg1, dp_Arg2
-
- Serveraction:
- Call WRITE_PROTECT.
-
- Backtransfer (besides dp_Action/Res1/Res2):
-
- Postprocessing:
-
- =======================================
- ACTION_MORE_CACHE:
- =======================================
- Preprocessing:
-
- Transfer to Server:
- dp_Arg1
-
- Serveraction:
- Call MORE_CACHE.
-
- Backtransfer (besides dp_Action/Res1/Res2):
-
- Postprocessing:
-
- =======================================
- ACTION_SERIALIZE_DISK:
- =======================================
- Preprocessing:
-
- Transfer to Server:
-
- Serveraction:
- Call SERIALIZE_DISK.
-
- Backtransfer (besides dp_Action/Res1/Res2):
-
- Postprocessing:
-
- =======================================
- ACTION_FORMAT:
- =======================================
- Preprocessing:
-
- Transfer to Server:
- dp_Arg2, [2bytes space], BString
-
- Serveraction:
- Call FORMAT.
-
- Backtransfer (besides dp_Action/Res1/Res2):
-
- Postprocessing:
-
- =======================================
- ACTION_RENAME_DISK:
- =======================================
- Preprocessing:
-
- Transfer to Server:
- [2bytes free], BSTR (name)
-
- Serveraction:
- Call RENAME_DISK
-
- Backtransfer (besides dp_Action/Res1/Res2):
-
- Postprocessing:
- Change dol_Name of Current Volume if no ERROR.
-
- =======================================
- ACTION_FIND#?:
- =======================================
- Preprocessing:
-
- Transfer to Server:
- FL->fl_Key or NULL if ZERO-lock.
- BSTR
-
- Serveraction:
- Create sFH zeroed except fh_Pos and fh_End = -1
- Call FINDxxx.
-
- Backtransfer (besides dp_Action/Res1/Res2):
- BPTR to sFH
-
- Postprocessing:
- &sFH -> FH->fh_Arg1
- DOSTRUE -> fh_Port
-
- =======================================
- ACTION_END:
- =======================================
- Preprocessing:
-
- Transfer to Server:
- FH->fh_Arg1
-
- Serveraction:
- Call END and free sFH.
-
- Backtransfer (besides dp_Action/Res1/Res2):
-
- Postprocessing:
-
- =======================================
- ACTION_SEEK:
- =======================================
- Preprocessing:
-
- Transfer to Server:
- FH->fh_Arg1, LONG, LONG
-
- Serveraction:
- Call SEEK.
-
- Backtransfer (besides dp_Action/Res1/Res2):
-
- Postprocessing:
-
- =======================================
- ACTION_READ:
- =======================================
- Preprocessing:
-
- Transfer to Server:
- FH->fh_Arg1, LONG (length)
-
- Serveraction:
- Allocate buffer large enough, call ACTION_READ with it, then transmit
- data if no Error occured.
-
- Backtransfer (besides dp_Action/Res1/Res2):
- First answer will contain only the results. If no error occured,
- more packets of a fixed size will follow. Size is defined in
- 'network.i' as MAXPACKETSIZE. The received data will be put in
- the buffer passed in dp_Arg2
-
- Postprocessing:
-
- =======================================
- ACTION_WRITE:
- =======================================
- Preprocessing:
-
- Transfer to Server:
- FH->fh_Arg1, LONG (length)
-
- Serveraction:
- Allocate buffer large enough and return error if no mem.
-
- Backtransfer (besides dp_Action/Res1/Res2):
-
- Postprocessing:
- Send write data in chunks of MAXPACKETSIZE bytes. The data will be
- put into the buffer allocated by the Server. If all bytes have been
- sent, the Server calls ACTION_WRITE with it and returns the results.
-
- =======================================
- ACTION_SAME_LOCK:
- =======================================
- Preprocessing:
- Test if fl_Volume of both Locks are equal - if not, return DOSFALSE/0.
-
- Transfer to Server:
- 2xFL->fl_Key
-
- Serveraction:
- Try SAME_LOCK. If not implemented, try comparing fl_Volume, then try
- comparing fl_Key - if this is okay, return OK.
-
- Backtransfer (besides dp_Action/Res1/Res2):
-
- Postprocessing:
-
- =======================================
- ACTION_SET_PROTECT:
- =======================================
- Preprocessing:
-
- Transfer to Server:
- FL->fl_Key
- [2bytes Space -> lW-alignment]
- Object-Name-String
-
- Serveraction:
- Call SET_PROTECT.
-
- Backtransfer (besides dp_Action/Res1/Res2):
-
- Postprocessing:
-
- =======================================
- ACTION_COPY_DIR:
- =======================================
- Preprocessing:
-
- Transfer to Server:
- FL->fl_Key
-
- Serveraction:
- Call COPY_DIR
-
- Backtransfer (besides dp_Action/Res1/Res2):
- BPTR->sFL(in Res1), fl_Access
-
- Postprocessing:
- Create new lock if no error occured and put fl_Access there.
-
- =======================================
- ACTION_PARENT:
- =======================================
- similar to COPY_DIR.
-
- =======================================
- ACTION_PARENT_FH:
- =======================================
- Preprocessing:
-
- Transfer to Server:
- dp_Arg1
-
- Serveraction:
- Call PARENT_FH.
-
- Backtransfer (besides dp_Action/Res1/Res2):
- BPTR->sFL(in Res1), fl_Access
-
- Postprocessing:
- Create new lock if no error occured and put fl_Access there.
-
- =======================================
- ACTION_COPY_DIR_FH:
- =======================================
- similar to PARENT_FH.
-
- =======================================
- ACTION_DELETE_OBJECT:
- =======================================
- Preprocessing:
-
- Transfer to Server:
- FL->fl_Key, BSTR
-
- Serveraction:
- Call DELETE_OBJECT.
-
- Backtransfer (besides dp_Action/Res1/Res2):
-
- Postprocessing:
-
- =======================================
- ACTION_RENAME_OBJECT:
- =======================================
- Preprocessing:
-
- Transfer to Server:
- 2xFL->fl_Key [2space] BSTR [filled up to 256] BSTR
-
- Serveraction:
- Call RENAME_OBJECT.
-
- Backtransfer (besides dp_Action/Res1/Res2):
-
- Postprocessing:
-
- =======================================
- ACTION_CREATE_DIR:
- =======================================
- Preprocessing:
-
- Transfer to Server:
- FL->fl_Key [2space] BSTR
-
- Serveraction:
- Call CREATE_DIR.
-
- Backtransfer (besides dp_Action/Res1/Res2):
- BPTR->sFL(in Res1), fl_Access
-
- Postprocessing:
- Create new lock if no error occured and put fl_Access there.
-
- =======================================
- ACTION_INHIBIT:
- =======================================
- ** INHIBIT doesn't cause our handler to remove volumenode etc., this
- ** is just implemented to support the DiskChange command !!
- Preprocessing:
-
- Transfer to Server:
- LONG
-
- Serveraction:
- Call INHIBIT.
-
- Backtransfer (besides dp_Action/Res1/Res2):
-
- Postprocessing:
-
- =======================================
- ACTION_SET_DATE:
- =======================================
- Preprocessing:
-
- Transfer to Server:
-
- Serveraction:
-
- Backtransfer (besides dp_Action/Res1/Res2):
-
- Postprocessing:
-
- =======================================
- ACTION_MAKE_LINK:
- =======================================
- Preprocessing:
-
- Transfer to Server:
- LINK_HARD:
- LONG (dp_Arg4) / FL->fl_Key (from dp_Arg1) / FL->fl_Key (from dp_Arg3)
- [2 space] BSTR
- LINK_SOFT:
- LONG (dp_Arg4) / FL->fl_Key (from dp_Arg1) / C-String [round up to 256 chars] / [2 space] / BSTR in dp_Arg2
-
- Serveraction:
- Call MAKE_LINK.
-
- Backtransfer (besides dp_Action/Res1/Res2):
-
- Postprocessing:
-
- =======================================
- ACTION_READ_LINK:
- =======================================
- Preprocessing:
-
- Transfer to Server:
- FL->fl_Key (dp_Arg1) / ULONG(size) / C-String
-
- Serveraction:
- Call READ_LINK and with buffer = sendbuf, then return
-
- Backtransfer (besides dp_Action/Res1/Res2):
- <size> bytes of string.
-
- Postprocessing:
-
- =======================================
- ACTION_FH_FROM_LOCK:
- =======================================
- ** works similar to FINDxx except that lock is discarded on success
- ** and no object name is provided.
-
- =======================================
- ACTION_:
- =======================================
- Preprocessing:
-
- Transfer to Server:
-
- Serveraction:
-
- Backtransfer (besides dp_Action/Res1/Res2):
-
- Postprocessing:
-
- =======================================
- ACTION_:
- =======================================
- Preprocessing:
-
- Transfer to Server:
-
- Serveraction:
-
- Backtransfer (besides dp_Action/Res1/Res2):
-
- Postprocessing:
-
-